/**
 * 
 */
package p1;

/**
 * @author Janis Daubergs
 *
 */
public class Person {
        public String name;
        public String surname;
        public int perscode;

        public String getName(){
            return this.name;
        }
        public String getSurname(){
            return this.surname;
        }
        public int getPersCode(){
            return this.perscode;
        }
        public void setName(String newName) {
            this.name = newName;
        }
        public void setSurname(String newSurname) {
            this.surname = newSurname;
        }
        public void setPersCode(int newPerscode) {
            this.perscode = newPerscode;
        }
        public Person(String n, String sn, int pc) {
            setName(n);
            setSurname(sn);
            setPersCode(pc);
        }
        public Person() {
            name="myname";
            surname="mysurname";
            perscode=00000000000;
        }
      public String toString(){
            StringBuilder personString= new StringBuilder();
            personString.append(getName()).append(" ").append(getSurname()).append(" ").append(getPersCode());
            String pers = new String(personString);
            return pers;     
        }
        
       
}


